package kr.hyunist.androidcomplete01saeildamil.ch17;

import kr.hyunist.androidcomplete01saeildamil.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class AnotherActivity extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.anotheractivity);
		
		Button btn = (Button) findViewById(R.id.anotheractivityreturnbtn);
		btn.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent resultIntent = new Intent();
				resultIntent.putExtra("name", "mike");
				setResult(1, resultIntent);
				finish();
			}
			
		});
				
	}
}
